package org.smog.core.exception;

import lombok.Data;

/**
 * 基础异常
 *
 * @Description: Created by IntelliJ IDEA.
 * @project_name: smogTemp
 * @time: 2020-05-14 11:12
 * @email: 17685306043@163.com
 * @author: huangZhongYao
 */
@Data
public abstract class BaseException extends RuntimeException {

    /**
     * 异常编码
     */
    public int code;

    /**
     * 异常等级
     */
    public int level;

    public BaseException() {
        super();
    }

    public BaseException(Throwable cause) {
        super(cause);
    }

    public BaseException(String message) {
        super(message);
    }

    public BaseException(String message, int code) {
        super(message);
        this.code = code;
    }

    public BaseException(String message, int code,int level) {
        super(message);
        this.code = code;
        this.level = level;
    }

    public BaseException(String message, Throwable cause) {
        super(message, cause);
    }
}
